package com.es.elasticsearchdemo;

import org.elasticsearch.index.query.TermQueryBuilder;

import java.io.IOException;

/**
 * @author : yx-0176
 * @description
 * @date : 2021/11/1
 */
public interface EsService {

    void createIndex(String indexName) throws IOException;

    boolean existsIndex(String indexName) throws IOException;

    void delIndex(String indexName) throws IOException;

    void getDocument(String indexName,String docName) throws IOException;

    void addDocument(String indexName,String docName, Object obj) throws IOException;

    void updateDocment(String indexName,String docName, Object obj) throws IOException;

    void deleteDocment(String indexName,String docName) throws IOException;

    void search(String indexName, TermQueryBuilder query) throws IOException;

    void searchHighLight(String indexName, TermQueryBuilder query) throws IOException;
}
